<:foreach $dirlist $key $var:> <:if $var[type] == 'dir':>
<:$var['name']:>
<:else:> <:/if:> <:/foreach:>